http: attach error handler to socket synchronously in onSocket - #61770
nodejs-github-bot merged 2 commits into
Conversation
|
Review requested:
|
|
Can you revert the other change as part of this PR? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61770 +/- ##
==========================================
+ Coverage 89.73% 89.76% +0.02%
==========================================
Files 675 675
Lines 204648 204674 +26
Branches 39330 39339 +9
==========================================
+ Hits 183651 183720 +69
+ Misses 13282 13231 -51
- Partials 7715 7723 +8
🚀 New features to boost your workflow:
|
3f0a317 to
cc09fb0
Compare
ab1a46b to
341f0f3
Compare
pimterry
left a comment
There was a problem hiding this comment.
Looks good in general, I think there's just a couple of changes we should make before we merge this to clear things up a bit.
| // Use socket directly as req.socket may not be assigned yet (e.g. when | ||
| // the error is emitted before onSocketNT runs). | ||
| (req.socket || socket)._hadError = true; |
There was a problem hiding this comment.
I think we could simplify this to just
| // Use socket directly as req.socket may not be assigned yet (e.g. when | |
| // the error is emitted before onSocketNT runs). | |
| (req.socket || socket)._hadError = true; | |
| socket._hadError = true; |
I've just had a look, and everywhere that socket._httpMessage is set to a request, req.socket is set at the same time, so if req is set they're always equivalent, and setting this on the socket in the socket error handler makes perfect sense to me conceptually.
(It looks like they could diverge if req were null - that logic is less clear - but that doesn't matter within this if)
| @@ -906,6 +908,9 @@ function tickOnSocket(req, socket) { | |||
| parser.joinDuplicateHeaders = req.joinDuplicateHeaders; | |||
|
|
|||
| parser.onIncoming = parserOnIncomingClient; | |||
| // Remove the early error listener attached in onSocket (if any) before | |||
| // re-adding it here to avoid duplicate listeners. | |||
| socket.removeListener('error', socketErrorListener); | |||
| socket.on('error', socketErrorListener); | |||
There was a problem hiding this comment.
I think we can drop both these lines these entirely:
- This method (
tickOnSocket) is only called fromonSocketNT onSocketNTis only called fromonSocket- This socket error handler will always have been set exactly once already, so this doesn't really do anything.
Anything I'm missing? This would make sense if the handlers were different, or maybe if there were other code paths through here, but I don't see any.
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: nodejs#48771 Refs: nodejs#61658
This reverts commit d8c00ad.
341f0f3 to
7d78891
Compare
|
Thanks @pimterry for the review! Both suggestions applied:
Updated the commit message as well to reflect the simpler approach. |
|
Landed in 1523d66 |
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | minor | `24.14.1` → `24.15.0` | --- ### Release Notes <details> <summary>nodejs/node (node)</summary> ### [`v24.15.0`](https://github.com/nodejs/node/releases/tag/v24.15.0): 2026-04-15, Version 24.15.0 'Krypton' (LTS), @​aduh95 [Compare Source](https://github.com/nodejs/node/compare/v24.14.1...v24.15.0) ##### Notable Changes - \[[`3d87ecacbc`](https://github.com/nodejs/node/commit/3d87ecacbc)] - **(SEMVER-MINOR)** **cli**: add --max-heap-size option (tannal) [#​58708](https://github.com/nodejs/node/pull/58708) - \[[`83c38672f7`](https://github.com/nodejs/node/commit/83c38672f7)] - **cli**: add --require-module/--no-require-module (Joyee Cheung) [#​60959](https://github.com/nodejs/node/pull/60959) - \[[`54ef940e01`](https://github.com/nodejs/node/commit/54ef940e01)] - **(SEMVER-MINOR)** **crypto**: add raw key formats support to the KeyObject APIs (Filip Skokan) [#​62240](https://github.com/nodejs/node/pull/62240) - \[[`f4a3edc47a`](https://github.com/nodejs/node/commit/f4a3edc47a)] - **(SEMVER-MINOR)** **fs**: add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) [#​61178](https://github.com/nodejs/node/pull/61178) - \[[`5cdcba17cc`](https://github.com/nodejs/node/commit/5cdcba17cc)] - **(SEMVER-MINOR)** **http2**: add http1Options for HTTP/1 fallback configuration (Amol Yadav) [#​61713](https://github.com/nodejs/node/pull/61713) - \[[`8b6be3fe14`](https://github.com/nodejs/node/commit/8b6be3fe14)] - **module**: mark require(esm) as stable (Joyee Cheung) [#​60959](https://github.com/nodejs/node/pull/60959) - \[[`68fbc0c6cc`](https://github.com/nodejs/node/commit/68fbc0c6cc)] - **module**: mark module compile cache as stable (Joyee Cheung) [#​60971](https://github.com/nodejs/node/pull/60971) - \[[`c851e76f8c`](https://github.com/nodejs/node/commit/c851e76f8c)] - **(SEMVER-MINOR)** **net**: add `setTOS` and `getTOS` to `Socket` (Amol Yadav) [#​61503](https://github.com/nodejs/node/pull/61503) - \[[`6ac4304c87`](https://github.com/nodejs/node/commit/6ac4304c87)] - **(SEMVER-MINOR)** **sqlite**: add limits property to DatabaseSync (Mert Can Altin) [#​61298](https://github.com/nodejs/node/pull/61298) - \[[`aaf9af1672`](https://github.com/nodejs/node/commit/aaf9af1672)] - **sqlite**: mark as release candidate (Matteo Collina) [#​61262](https://github.com/nodejs/node/pull/61262) - \[[`eb77a7a297`](https://github.com/nodejs/node/commit/eb77a7a297)] - **(SEMVER-MINOR)** **src**: add C++ support for diagnostics channels (RafaelGSS) [#​61869](https://github.com/nodejs/node/pull/61869) - \[[`6834ca13bb`](https://github.com/nodejs/node/commit/6834ca13bb)] - **(SEMVER-MINOR)** **stream**: rename `Duplex.toWeb()` type option to `readableType` (René) [#​61632](https://github.com/nodejs/node/pull/61632) - \[[`f5f21d36a6`](https://github.com/nodejs/node/commit/f5f21d36a6)] - **test\_runner**: add exports option for module mocks (sangwook) [#​61727](https://github.com/nodejs/node/pull/61727) - \[[`1f2025fd1e`](https://github.com/nodejs/node/commit/1f2025fd1e)] - **(SEMVER-MINOR)** **test\_runner**: expose worker ID for concurrent test execution (Ali Hassan) [#​61394](https://github.com/nodejs/node/pull/61394) - \[[`1ca20fc33d`](https://github.com/nodejs/node/commit/1ca20fc33d)] - **(SEMVER-MINOR)** **test\_runner**: show interrupted test on SIGINT (Matteo Collina) [#​61676](https://github.com/nodejs/node/pull/61676) ##### Commits - \[[`148373cea1`](https://github.com/nodejs/node/commit/148373cea1)] - **assert,util**: improve comparison performance (Ruben Bridgewater) [#​61176](https://github.com/nodejs/node/pull/61176) - \[[`e5558b0859`](https://github.com/nodejs/node/commit/e5558b0859)] - **assert,util**: fix deep comparing invalid dates skipping properties (Ruben Bridgewater) [#​61076](https://github.com/nodejs/node/pull/61076) - \[[`83cffd92b5`](https://github.com/nodejs/node/commit/83cffd92b5)] - **async\_hooks**: enabledHooksExist shall return if hooks are enabled (Gerhard Stöbich) [#​61054](https://github.com/nodejs/node/pull/61054) - \[[`2c9436b43d`](https://github.com/nodejs/node/commit/2c9436b43d)] - **benchmark**: fix destructuring in dgram/single-buffer (Ali Hassan) [#​62084](https://github.com/nodejs/node/pull/62084) - \[[`837acd7382`](https://github.com/nodejs/node/commit/837acd7382)] - **benchmark**: add startup benchmark for ESM entrypoint (Joyee Cheung) [#​61769](https://github.com/nodejs/node/pull/61769) - \[[`a6ced7d272`](https://github.com/nodejs/node/commit/a6ced7d272)] - **buffer**: improve performance of multiple Buffer operations (Ali Hassan) [#​61871](https://github.com/nodejs/node/pull/61871) - \[[`a82003bf8b`](https://github.com/nodejs/node/commit/a82003bf8b)] - **buffer**: optimize buffer.concat performance (Mert Can Altin) [#​61721](https://github.com/nodejs/node/pull/61721) - \[[`83dfd0be1d`](https://github.com/nodejs/node/commit/83dfd0be1d)] - **buffer**: disallow ArrayBuffer transfer on pooled buffer (Chengzhong Wu) [#​61372](https://github.com/nodejs/node/pull/61372) - \[[`ed2d0cb1bf`](https://github.com/nodejs/node/commit/ed2d0cb1bf)] - **build**: support empty libname flags in `configure.py` (Antoine du Hamel) [#​62477](https://github.com/nodejs/node/pull/62477) - \[[`09f7920267`](https://github.com/nodejs/node/commit/09f7920267)] - **build**: fix timezone-update path references (Chengzhong Wu) [#​62280](https://github.com/nodejs/node/pull/62280) - \[[`af46b15b91`](https://github.com/nodejs/node/commit/af46b15b91)] - **build**: use path-ignore in GHA coverage-windows.yml (Chengzhong Wu) [#​61811](https://github.com/nodejs/node/pull/61811) - \[[`2cf77eadd1`](https://github.com/nodejs/node/commit/2cf77eadd1)] - **build**: generate\_config\_gypi.py generates valid JSON (Shelley Vohr) [#​61791](https://github.com/nodejs/node/pull/61791) - \[[`e0220f0c35`](https://github.com/nodejs/node/commit/e0220f0c35)] - **build**: build with v8 gdbjit support on supported platform (Joyee Cheung) [#​61010](https://github.com/nodejs/node/pull/61010) - \[[`5505511dcb`](https://github.com/nodejs/node/commit/5505511dcb)] - **build**: enable -DV8\_ENABLE\_CHECKS flag (Ryuhei Shima) [#​61327](https://github.com/nodejs/node/pull/61327) - \[[`5f8ecf3940`](https://github.com/nodejs/node/commit/5f8ecf3940)] - **build**: add --debug-symbols to build with -g without enabling DCHECKs (Joyee Cheung) [#​61100](https://github.com/nodejs/node/pull/61100) - \[[`ab18c0867b`](https://github.com/nodejs/node/commit/ab18c0867b)] - **build**: fix --node-builtin-modules-path (Filip Skokan) [#​62115](https://github.com/nodejs/node/pull/62115) - \[[`bfa60d5782`](https://github.com/nodejs/node/commit/bfa60d5782)] - **build**: fix GN for new merve dep (Shelley Vohr) [#​61984](https://github.com/nodejs/node/pull/61984) - \[[`0d1975fe3a`](https://github.com/nodejs/node/commit/0d1975fe3a)] - **build,win**: add WinGet Visual Studio 2022 Build Tools Edition config (Mike McCready) [#​61652](https://github.com/nodejs/node/pull/61652) - \[[`10b2bb5fa6`](https://github.com/nodejs/node/commit/10b2bb5fa6)] - **child\_process**: add tracing channel for spawn (Marco) [#​61836](https://github.com/nodejs/node/pull/61836) - \[[`3d87ecacbc`](https://github.com/nodejs/node/commit/3d87ecacbc)] - **(SEMVER-MINOR)** **cli**: add --max-heap-size option (tannal) [#​58708](https://github.com/nodejs/node/pull/58708) - \[[`83c38672f7`](https://github.com/nodejs/node/commit/83c38672f7)] - **cli**: add --require-module/--no-require-module (Joyee Cheung) [#​60959](https://github.com/nodejs/node/pull/60959) - \[[`9d37233824`](https://github.com/nodejs/node/commit/9d37233824)] - **crypto**: update root certificates to NSS 3.121 (Node.js GitHub Bot) [#​62485](https://github.com/nodejs/node/pull/62485) - \[[`b0cbfe38a4`](https://github.com/nodejs/node/commit/b0cbfe38a4)] - **crypto**: add crypto::GetSSLCtx API for addon access to OpenSSL contexts (Tim Perry) [#​62254](https://github.com/nodejs/node/pull/62254) - \[[`dc034a4ac9`](https://github.com/nodejs/node/commit/dc034a4ac9)] - **crypto**: reject ML-KEM/ML-DSA [PKCS#8](https://github.com/PKCS/node/issues/8) import without seed in SubtleCrypto (Filip Skokan) [#​62218](https://github.com/nodejs/node/pull/62218) - \[[`8aa6e706df`](https://github.com/nodejs/node/commit/8aa6e706df)] - **crypto**: refactor WebCrypto AEAD algorithms auth tag handling (Filip Skokan) [#​62169](https://github.com/nodejs/node/pull/62169) - \[[`20cb932bcf`](https://github.com/nodejs/node/commit/20cb932bcf)] - **crypto**: read algorithm name property only once in normalizeAlgorithm (Filip Skokan) [#​62170](https://github.com/nodejs/node/pull/62170) - \[[`e2934162b4`](https://github.com/nodejs/node/commit/e2934162b4)] - **crypto**: add missing AES dictionaries (Filip Skokan) [#​62099](https://github.com/nodejs/node/pull/62099) - \[[`8b8db52f65`](https://github.com/nodejs/node/commit/8b8db52f65)] - **crypto**: fix importKey required argument count check (Filip Skokan) [#​62099](https://github.com/nodejs/node/pull/62099) - \[[`bd5458db29`](https://github.com/nodejs/node/commit/bd5458db29)] - **crypto**: fix missing nullptr check on RSA\_new() (ndossche) [#​61888](https://github.com/nodejs/node/pull/61888) - \[[`7302c7ed22`](https://github.com/nodejs/node/commit/7302c7ed22)] - **crypto**: fix handling of null BUF\_MEM\* in ToV8Value() (Nora Dossche) [#​61885](https://github.com/nodejs/node/pull/61885) - \[[`8d0c22ea20`](https://github.com/nodejs/node/commit/8d0c22ea20)] - **crypto**: fix potential null pointer dereference when BIO\_meth\_new() fails (Nora Dossche) [#​61788](https://github.com/nodejs/node/pull/61788) - \[[`72aad8b40f`](https://github.com/nodejs/node/commit/72aad8b40f)] - **crypto**: always return certificate serial numbers as uppercase (Anna Henningsen) [#​61752](https://github.com/nodejs/node/pull/61752) - \[[`2395fc0f4d`](https://github.com/nodejs/node/commit/2395fc0f4d)] - **crypto**: rename CShakeParams and KmacParams length to outputLength (Filip Skokan) [#​61875](https://github.com/nodejs/node/pull/61875) - \[[`541be3aaf2`](https://github.com/nodejs/node/commit/541be3aaf2)] - **crypto**: recognize raw formats in keygen (Filip Skokan) [#​62480](https://github.com/nodejs/node/pull/62480) - \[[`54ef940e01`](https://github.com/nodejs/node/commit/54ef940e01)] - **(SEMVER-MINOR)** **crypto**: add raw key formats support to the KeyObject APIs (Filip Skokan) [#​62240](https://github.com/nodejs/node/pull/62240) - \[[`bef1949823`](https://github.com/nodejs/node/commit/bef1949823)] - **deps**: V8: cherry-pick [`33e7739`](https://github.com/nodejs/node/commit/33e7739c134d) (Thibaud Michaud) [#​62567](https://github.com/nodejs/node/pull/62567) - \[[`2e1a565a55`](https://github.com/nodejs/node/commit/2e1a565a55)] - **deps**: update ada to 3.4.4 (Node.js GitHub Bot) [#​62414](https://github.com/nodejs/node/pull/62414) - \[[`d0418bad10`](https://github.com/nodejs/node/commit/d0418bad10)] - **deps**: update timezone to 2026a (Node.js GitHub Bot) [#​62164](https://github.com/nodejs/node/pull/62164) - \[[`53aad66415`](https://github.com/nodejs/node/commit/53aad66415)] - **deps**: update googletest to [`2461743`](https://github.com/nodejs/node/commit/2461743991f9aa53e9a3625eafcbacd81a3c74cd) (Node.js GitHub Bot) [#​62484](https://github.com/nodejs/node/pull/62484) - \[[`90fab71a84`](https://github.com/nodejs/node/commit/90fab71a84)] - **deps**: update simdjson to 4.5.0 (Node.js GitHub Bot) [#​62382](https://github.com/nodejs/node/pull/62382) - \[[`a416ddf6d9`](https://github.com/nodejs/node/commit/a416ddf6d9)] - **deps**: V8: cherry-pick [`cf1bce4`](https://github.com/nodejs/node/commit/cf1bce40a5ef) (Richard Lau) [#​62449](https://github.com/nodejs/node/pull/62449) - \[[`4d9123e57d`](https://github.com/nodejs/node/commit/4d9123e57d)] - **deps**: upgrade npm to 11.12.1 (npm team) [#​62448](https://github.com/nodejs/node/pull/62448) - \[[`952d715028`](https://github.com/nodejs/node/commit/952d715028)] - **deps**: update sqlite to 3.51.3 (Node.js GitHub Bot) [#​62256](https://github.com/nodejs/node/pull/62256) - \[[`f3fd7ed426`](https://github.com/nodejs/node/commit/f3fd7ed426)] - **deps**: update googletest to [`73a63ea`](https://github.com/nodejs/node/commit/73a63ea05dc8ca29ec1d2c1d66481dd0de1950f1) (Node.js GitHub Bot) [#​61927](https://github.com/nodejs/node/pull/61927) - \[[`71a2f82d7c`](https://github.com/nodejs/node/commit/71a2f82d7c)] - **deps**: upgrade npm to 11.11.1 (npm team) [#​62216](https://github.com/nodejs/node/pull/62216) - \[[`84f60c26f7`](https://github.com/nodejs/node/commit/84f60c26f7)] - **deps**: update amaro to 1.1.8 (Node.js GitHub Bot) [#​62151](https://github.com/nodejs/node/pull/62151) - \[[`43159d0e5f`](https://github.com/nodejs/node/commit/43159d0e5f)] - **deps**: update sqlite to 3.52.0 (Node.js GitHub Bot) [#​62150](https://github.com/nodejs/node/pull/62150) - \[[`b887657b38`](https://github.com/nodejs/node/commit/b887657b38)] - **deps**: V8: cherry-pick [`aa0b288`](https://github.com/nodejs/node/commit/aa0b288f87cc) (Richard Lau) [#​62136](https://github.com/nodejs/node/pull/62136) - \[[`7ab885b323`](https://github.com/nodejs/node/commit/7ab885b323)] - **deps**: update ada to 3.4.3 (Node.js GitHub Bot) [#​62049](https://github.com/nodejs/node/pull/62049) - \[[`671ddec2b9`](https://github.com/nodejs/node/commit/671ddec2b9)] - **deps**: update minimatch to 10.2.4 (Node.js GitHub Bot) [#​62016](https://github.com/nodejs/node/pull/62016) - \[[`290fe37d4d`](https://github.com/nodejs/node/commit/290fe37d4d)] - **deps**: update simdjson to 4.3.1 (Node.js GitHub Bot) [#​61930](https://github.com/nodejs/node/pull/61930) - \[[`a13bee76b5`](https://github.com/nodejs/node/commit/a13bee76b5)] - **deps**: update acorn-walk to 8.3.5 (Node.js GitHub Bot) [#​61928](https://github.com/nodejs/node/pull/61928) - \[[`f0e40b35b9`](https://github.com/nodejs/node/commit/f0e40b35b9)] - **deps**: update acorn to 8.16.0 (Node.js GitHub Bot) [#​61925](https://github.com/nodejs/node/pull/61925) - \[[`463dfa023a`](https://github.com/nodejs/node/commit/463dfa023a)] - **deps**: update minimatch to 10.2.2 (Node.js GitHub Bot) [#​61830](https://github.com/nodejs/node/pull/61830) - \[[`4b2e4bb108`](https://github.com/nodejs/node/commit/4b2e4bb108)] - **deps**: update nbytes to 0.1.3 (Node.js GitHub Bot) [#​61879](https://github.com/nodejs/node/pull/61879) - \[[`5626cb83d0`](https://github.com/nodejs/node/commit/5626cb83d0)] - **deps**: remove stale OpenSSL arch configs (René) [#​61834](https://github.com/nodejs/node/pull/61834) - \[[`52668874fd`](https://github.com/nodejs/node/commit/52668874fd)] - **deps**: update llhttp to 9.3.1 (Node.js GitHub Bot) [#​61827](https://github.com/nodejs/node/pull/61827) - \[[`b3387b07b1`](https://github.com/nodejs/node/commit/b3387b07b1)] - **deps**: update googletest to [`5a9c3f9`](https://github.com/nodejs/node/commit/5a9c3f9e8d9b90bbbe8feb32902146cb8f7c1757) (Node.js GitHub Bot) [#​61731](https://github.com/nodejs/node/pull/61731) - \[[`196268cb4c`](https://github.com/nodejs/node/commit/196268cb4c)] - **deps**: V8: cherry-pick [`c5ff7c4`](https://github.com/nodejs/node/commit/c5ff7c4d6cde) (Chengzhong Wu) [#​61372](https://github.com/nodejs/node/pull/61372) - \[[`36869b52de`](https://github.com/nodejs/node/commit/36869b52de)] - **deps**: update merve to 1.2.2 (Node.js GitHub Bot) [#​62213](https://github.com/nodejs/node/pull/62213) - \[[`3cbac055de`](https://github.com/nodejs/node/commit/3cbac055de)] - **deps**: update merve to 1.2.0 (Node.js GitHub Bot) [#​62149](https://github.com/nodejs/node/pull/62149) - \[[`7757cc3495`](https://github.com/nodejs/node/commit/7757cc3495)] - **deps**: V8: backport [`6a0a25a`](https://github.com/nodejs/node/commit/6a0a25abaed3) (Vivian Wang) [#​61670](https://github.com/nodejs/node/pull/61670) - \[[`359797c2fb`](https://github.com/nodejs/node/commit/359797c2fb)] - **deps,src**: prepare for cpplint update (Michaël Zasso) [#​60901](https://github.com/nodejs/node/pull/60901) - \[[`ace802e59b`](https://github.com/nodejs/node/commit/ace802e59b)] - **diagnostics\_channel**: add diagnostics channels for web locks (Ilyas Shabi) [#​62123](https://github.com/nodejs/node/pull/62123) - \[[`a072411b03`](https://github.com/nodejs/node/commit/a072411b03)] - **doc**: remove spawn with shell example from bat/cmd section (Kit Dallege) [#​62243](https://github.com/nodejs/node/pull/62243) - \[[`0b152449af`](https://github.com/nodejs/node/commit/0b152449af)] - **doc**: fix typo in --disable-wasm-trap-handler description (Dmytro Semchuk) [#​61820](https://github.com/nodejs/node/pull/61820) - \[[`73ea387ad7`](https://github.com/nodejs/node/commit/73ea387ad7)] - **doc**: remove obsolete Boxstarter automated install (Mike McCready) [#​61785](https://github.com/nodejs/node/pull/61785) - \[[`7f234add8e`](https://github.com/nodejs/node/commit/7f234add8e)] - **doc**: deprecate `module.register()` (DEP0205) (Geoffrey Booth) [#​62395](https://github.com/nodejs/node/pull/62395) - \[[`12fc3c6a30`](https://github.com/nodejs/node/commit/12fc3c6a30)] - **doc**: clarify that features cannot be both experimental and deprecated (Antoine du Hamel) [#​62456](https://github.com/nodejs/node/pull/62456) - \[[`1ecc5962a2`](https://github.com/nodejs/node/commit/1ecc5962a2)] - **doc**: fix 'transfered' typo in quic.md (lilianakatrina684-a11y) [#​62492](https://github.com/nodejs/node/pull/62492) - \[[`56741a1303`](https://github.com/nodejs/node/commit/56741a1303)] - **doc**: move sqlite type conversion section to correct level (René) [#​62482](https://github.com/nodejs/node/pull/62482) - \[[`12b04d17d5`](https://github.com/nodejs/node/commit/12b04d17d5)] - **doc**: add Rafael to last security release steward (Rafael Gonzaga) [#​62423](https://github.com/nodejs/node/pull/62423) - \[[`c4567e4a8d`](https://github.com/nodejs/node/commit/c4567e4a8d)] - **doc**: fix overstated Date header requirement in response.sendDate (Kit Dallege) [#​62206](https://github.com/nodejs/node/pull/62206) - \[[`384a41047f`](https://github.com/nodejs/node/commit/384a41047f)] - **doc**: enhance clarification about the main field (Mowafak Almahaini) [#​62302](https://github.com/nodejs/node/pull/62302) - \[[`93d19b1a1c`](https://github.com/nodejs/node/commit/93d19b1a1c)] - **doc**: minor typo fix (Jeff Matson) [#​62358](https://github.com/nodejs/node/pull/62358) - \[[`3db35d2c59`](https://github.com/nodejs/node/commit/3db35d2c59)] - **doc**: add path to vulnerabilities.json mention (Rafael Gonzaga) [#​62355](https://github.com/nodejs/node/pull/62355) - \[[`57b105c9d5`](https://github.com/nodejs/node/commit/57b105c9d5)] - **doc**: deprecate CryptoKey use in node:crypto (Filip Skokan) [#​62321](https://github.com/nodejs/node/pull/62321) - \[[`490168c993`](https://github.com/nodejs/node/commit/490168c993)] - **doc**: fix small environment\_variables typo (chris) [#​62279](https://github.com/nodejs/node/pull/62279) - \[[`0291be584b`](https://github.com/nodejs/node/commit/0291be584b)] - **doc**: test and test-only targets do not run linter (Xavier Stouder) [#​62120](https://github.com/nodejs/node/pull/62120) - \[[`ba0a82a1e1`](https://github.com/nodejs/node/commit/ba0a82a1e1)] - **doc**: clarify fs.ReadStream and fs.WriteStream are not constructable (Kit Dallege) [#​62208](https://github.com/nodejs/node/pull/62208) - \[[`125bdbf504`](https://github.com/nodejs/node/commit/125bdbf504)] - **doc**: clarify that any truthy value of `shell` is part of DEP0190 (Antoine du Hamel) [#​62249](https://github.com/nodejs/node/pull/62249) - \[[`a141ad0aeb`](https://github.com/nodejs/node/commit/a141ad0aeb)] - **doc**: remove outdated Chrome 66 and ndb references from debugger (Kit Dallege) [#​62202](https://github.com/nodejs/node/pull/62202) - \[[`44bde8e573`](https://github.com/nodejs/node/commit/44bde8e573)] - **doc**: add note (and caveat) for `mock.module` about customization hooks (Jacob Smith) [#​62075](https://github.com/nodejs/node/pull/62075) - \[[`8c46a1ca1a`](https://github.com/nodejs/node/commit/8c46a1ca1a)] - **doc**: copyedit `addons.md` (Antoine du Hamel) [#​62071](https://github.com/nodejs/node/pull/62071) - \[[`7f989f02f7`](https://github.com/nodejs/node/commit/7f989f02f7)] - **doc**: correct `util.convertProcessSignalToExitCode` validation behavior (René) [#​62134](https://github.com/nodejs/node/pull/62134) - \[[`a4466ebdac`](https://github.com/nodejs/node/commit/a4466ebdac)] - **doc**: add efekrskl as triager (Efe) [#​61876](https://github.com/nodejs/node/pull/61876) - \[[`db516eca3a`](https://github.com/nodejs/node/commit/db516eca3a)] - **doc**: fix markdown for `expectFailure` values (Jacob Smith) [#​62100](https://github.com/nodejs/node/pull/62100) - \[[`ad97045125`](https://github.com/nodejs/node/commit/ad97045125)] - **doc**: include url.resolve() in DEP0169 application deprecation (Mike McCready) [#​62002](https://github.com/nodejs/node/pull/62002) - \[[`309f37ba42`](https://github.com/nodejs/node/commit/309f37ba42)] - **doc**: expand SECURITY.md with non-vulnerability examples (Rafael Gonzaga) [#​61972](https://github.com/nodejs/node/pull/61972) - \[[`dbb3551b7b`](https://github.com/nodejs/node/commit/dbb3551b7b)] - **doc**: separate in-types and out-types in SQLite conversion docs (René) [#​62034](https://github.com/nodejs/node/pull/62034) - \[[`191c433db8`](https://github.com/nodejs/node/commit/191c433db8)] - **doc**: fix small logic error in DETECT\_MODULE\_SYNTAX (René) [#​62025](https://github.com/nodejs/node/pull/62025) - \[[`8511b1c784`](https://github.com/nodejs/node/commit/8511b1c784)] - **doc**: fix module.stripTypeScriptTypes indentation (René) [#​61992](https://github.com/nodejs/node/pull/61992) - \[[`dd1139f52c`](https://github.com/nodejs/node/commit/dd1139f52c)] - **doc**: update DEP0040 (punycode) to application type deprecation (Mike McCready) [#​61916](https://github.com/nodejs/node/pull/61916) - \[[`54009e9c62`](https://github.com/nodejs/node/commit/54009e9c62)] - **doc**: explicitly mention Slack handle (Rafael Gonzaga) [#​61986](https://github.com/nodejs/node/pull/61986) - \[[`78fa1a1a49`](https://github.com/nodejs/node/commit/78fa1a1a49)] - **doc**: support toolchain Visual Studio 2022 & 2026 + Windows 11 SDK (Mike McCready) [#​61864](https://github.com/nodejs/node/pull/61864) - \[[`d8204d3cdb`](https://github.com/nodejs/node/commit/d8204d3cdb)] - **doc**: rename invalid `function` parameter (René) [#​61942](https://github.com/nodejs/node/pull/61942) - \[[`a5a14482fb`](https://github.com/nodejs/node/commit/a5a14482fb)] - **doc**: clarify status of feature request issues (Antoine du Hamel) [#​61505](https://github.com/nodejs/node/pull/61505) - \[[`bd0688feb6`](https://github.com/nodejs/node/commit/bd0688feb6)] - **doc**: add esm and cjs examples to node:vm (Alfredo González) [#​61498](https://github.com/nodejs/node/pull/61498) - \[[`240b512f9f`](https://github.com/nodejs/node/commit/240b512f9f)] - **doc**: clarify build environment is trusted in threat model (Matteo Collina) [#​61865](https://github.com/nodejs/node/pull/61865) - \[[`5dd48e3456`](https://github.com/nodejs/node/commit/5dd48e3456)] - **doc**: remove incorrect mention of `module` in `typescript.md` (Rob Palmer) [#​61839](https://github.com/nodejs/node/pull/61839) - \[[`9502c22055`](https://github.com/nodejs/node/commit/9502c22055)] - **doc**: simplify addAbortListener example (Chemi Atlow) [#​61842](https://github.com/nodejs/node/pull/61842) - \[[`6fec397828`](https://github.com/nodejs/node/commit/6fec397828)] - **doc**: clean up globals.md (René) [#​61822](https://github.com/nodejs/node/pull/61822) - \[[`a810f5ccef`](https://github.com/nodejs/node/commit/a810f5ccef)] - **doc**: clarify async caveats for `events.once()` (René) [#​61572](https://github.com/nodejs/node/pull/61572) - \[[`2bf990bb1a`](https://github.com/nodejs/node/commit/2bf990bb1a)] - **doc**: update Juan's security steward info (Juan José) [#​61754](https://github.com/nodejs/node/pull/61754) - \[[`0312db948d`](https://github.com/nodejs/node/commit/0312db948d)] - **doc**: fix methods being documented as properties in `process.md` (Antoine du Hamel) [#​61765](https://github.com/nodejs/node/pull/61765) - \[[`e558b26e7f`](https://github.com/nodejs/node/commit/e558b26e7f)] - **doc**: add riscv64 info into platform list (Lu Yahan) [#​42251](https://github.com/nodejs/node/pull/42251) - \[[`49254e3dc0`](https://github.com/nodejs/node/commit/49254e3dc0)] - **doc**: fix dropdown menu being obscured at <600px due to stacking context (Jeff) [#​61735](https://github.com/nodejs/node/pull/61735) - \[[`4ff01b5c10`](https://github.com/nodejs/node/commit/4ff01b5c10)] - **doc**: fix spacing in process message event (Aviv Keller) [#​61756](https://github.com/nodejs/node/pull/61756) - \[[`94097a79d6`](https://github.com/nodejs/node/commit/94097a79d6)] - **doc**: move describe/it aliases section before expectFailure (Luca Raveri) [#​61567](https://github.com/nodejs/node/pull/61567) - \[[`b7cd31acbe`](https://github.com/nodejs/node/commit/b7cd31acbe)] - **doc**: fix broken links of net.md (YuSheng Chen) [#​61673](https://github.com/nodejs/node/pull/61673) - \[[`ae5e353fe2`](https://github.com/nodejs/node/commit/ae5e353fe2)] - **doc**: clean up Windows code snippet in `child_process.md` (reillylm) [#​61422](https://github.com/nodejs/node/pull/61422) - \[[`ea9beb6a3c`](https://github.com/nodejs/node/commit/ea9beb6a3c)] - **doc**: update to Visual Studio 2026 manual install (Mike McCready) [#​61655](https://github.com/nodejs/node/pull/61655) - \[[`42057c84e2`](https://github.com/nodejs/node/commit/42057c84e2)] - **doc,module**: add missing doc for syncHooks.deregister() (Joyee Cheung) [#​61959](https://github.com/nodejs/node/pull/61959) - \[[`a035bd5235`](https://github.com/nodejs/node/commit/a035bd5235)] - **doc,test**: clarify --eval syntax for leading '-' scripts (kovan) [#​62244](https://github.com/nodejs/node/pull/62244) - \[[`deb0b78460`](https://github.com/nodejs/node/commit/deb0b78460)] - **esm**: fix typo in worker loader hook comment (jakecastelli) [#​62475](https://github.com/nodejs/node/pull/62475) - \[[`b93bf7dbfc`](https://github.com/nodejs/node/commit/b93bf7dbfc)] - **esm**: fix source phase identity bug in loadCache eviction (Guy Bedford) [#​62415](https://github.com/nodejs/node/pull/62415) - \[[`679d18b57f`](https://github.com/nodejs/node/commit/679d18b57f)] - **esm**: fix path normalization in `finalizeResolution` (Antoine du Hamel) [#​62080](https://github.com/nodejs/node/pull/62080) - \[[`171e9fc268`](https://github.com/nodejs/node/commit/171e9fc268)] - **esm**: update outdated FIXME comment in translators.js (Karan Mangtani) [#​61715](https://github.com/nodejs/node/pull/61715) - \[[`cc19728228`](https://github.com/nodejs/node/commit/cc19728228)] - **events**: avoid cloning listeners array on every emit (Gürgün Dayıoğlu) [#​62261](https://github.com/nodejs/node/pull/62261) - \[[`458c92be52`](https://github.com/nodejs/node/commit/458c92be52)] - **events**: don't call resume after close (Сковорода Никита Андреевич) [#​60548](https://github.com/nodejs/node/pull/60548) - \[[`4691f3e7fb`](https://github.com/nodejs/node/commit/4691f3e7fb)] - **fs**: fix cpSync to handle non-ASCII characters (Stefan Stojanovic) [#​61950](https://github.com/nodejs/node/pull/61950) - \[[`f4a3edc47a`](https://github.com/nodejs/node/commit/f4a3edc47a)] - **(SEMVER-MINOR)** **fs**: add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) [#​61178](https://github.com/nodejs/node/pull/61178) - \[[`58e4d50cd0`](https://github.com/nodejs/node/commit/58e4d50cd0)] - **http**: fix use-after-free when freeParser is called during llhttp\_execute (Gerhard Stöbich) [#​62095](https://github.com/nodejs/node/pull/62095) - \[[`0a4ad85ab0`](https://github.com/nodejs/node/commit/0a4ad85ab0)] - **http**: validate ClientRequest path on set (Matteo Collina) [#​62030](https://github.com/nodejs/node/pull/62030) - \[[`f8178ac3e6`](https://github.com/nodejs/node/commit/f8178ac3e6)] - **http**: validate headers in writeEarlyHints (Richard Clarke) [#​61897](https://github.com/nodejs/node/pull/61897) - \[[`899884d0ed`](https://github.com/nodejs/node/commit/899884d0ed)] - **http**: remove redundant keepAliveTimeoutBuffer assignment (Efe) [#​61743](https://github.com/nodejs/node/pull/61743) - \[[`08d2e40694`](https://github.com/nodejs/node/commit/08d2e40694)] - **http**: attach error handler to socket synchronously in onSocket (RajeshKumar11) [#​61770](https://github.com/nodejs/node/pull/61770) - \[[`1c2064c1f8`](https://github.com/nodejs/node/commit/1c2064c1f8)] - **http**: fix keep-alive socket reuse race in requestOnFinish (Martin Slota) [#​61710](https://github.com/nodejs/node/pull/61710) - \[[`38e9c66e0f`](https://github.com/nodejs/node/commit/38e9c66e0f)] - **http2**: add strictSingleValueFields option to relax header validation (Tim Perry) [#​59917](https://github.com/nodejs/node/pull/59917) - \[[`5cdcba17cc`](https://github.com/nodejs/node/commit/5cdcba17cc)] - **(SEMVER-MINOR)** **http2**: add http1Options for HTTP/1 fallback configuration (Amol Yadav) [#​61713](https://github.com/nodejs/node/pull/61713) - \[[`687c0acd00`](https://github.com/nodejs/node/commit/687c0acd00)] - **http2**: fix FileHandle leak in respondWithFile (sangwook) [#​61707](https://github.com/nodejs/node/pull/61707) - \[[`0c8f802ec2`](https://github.com/nodejs/node/commit/0c8f802ec2)] - **inspector**: add Target.getTargets and extract TargetManager (Kohei) [#​62487](https://github.com/nodejs/node/pull/62487) - \[[`7de8a303c1`](https://github.com/nodejs/node/commit/7de8a303c1)] - **inspector**: unwrap internal/debugger/inspect imports (René) [#​61974](https://github.com/nodejs/node/pull/61974) - \[[`59ac10a4fd`](https://github.com/nodejs/node/commit/59ac10a4fd)] - **lib**: make SubtleCrypto.supports enumerable (Filip Skokan) [#​62307](https://github.com/nodejs/node/pull/62307) - \[[`9dc102ba90`](https://github.com/nodejs/node/commit/9dc102ba90)] - **lib**: prefer primordials in SubtleCrypto (Filip Skokan) [#​62226](https://github.com/nodejs/node/pull/62226) - \[[`78a9aa8f32`](https://github.com/nodejs/node/commit/78a9aa8f32)] - **lib**: fix source map url parse in dynamic imports (Chengzhong Wu) [#​61990](https://github.com/nodejs/node/pull/61990) - \[[`16b8cc6643`](https://github.com/nodejs/node/commit/16b8cc6643)] - **lib**: improve argument handling in Blob constructor (Ms2ger) [#​61980](https://github.com/nodejs/node/pull/61980) - \[[`a03b5d39b8`](https://github.com/nodejs/node/commit/a03b5d39b8)] - **lib**: reduce cycles in esm loader and load it in snapshot (Joyee Cheung) [#​61769](https://github.com/nodejs/node/pull/61769) - \[[`1017bf5f86`](https://github.com/nodejs/node/commit/1017bf5f86)] - **lib**: remove top-level getOptionValue() calls in lib/internal/modules (Joyee Cheung) [#​61769](https://github.com/nodejs/node/pull/61769) - \[[`d79984b41b`](https://github.com/nodejs/node/commit/d79984b41b)] - **lib**: optimize styleText when validateStream is false (Rafael Gonzaga) [#​61792](https://github.com/nodejs/node/pull/61792) - \[[`6462b89d10`](https://github.com/nodejs/node/commit/6462b89d10)] - **meta**: bump actions/download-artifact from 7.0.0 to 8.0.0 (dependabot\[bot]) [#​62063](https://github.com/nodejs/node/pull/62063) - \[[`5bb89916ea`](https://github.com/nodejs/node/commit/5bb89916ea)] - **meta**: bump actions/upload-artifact from 6.0.0 to 7.0.0 (dependabot\[bot]) [#​62062](https://github.com/nodejs/node/pull/62062) - \[[`b067d74d94`](https://github.com/nodejs/node/commit/b067d74d94)] - **meta**: bump step-security/harden-runner from 2.14.2 to 2.15.0 (dependabot\[bot]) [#​62064](https://github.com/nodejs/node/pull/62064) - \[[`830e5cd125`](https://github.com/nodejs/node/commit/830e5cd125)] - **meta**: bump github/codeql-action from 4.32.0 to 4.32.4 (dependabot\[bot]) [#​61911](https://github.com/nodejs/node/pull/61911) - \[[`16c839a3dd`](https://github.com/nodejs/node/commit/16c839a3dd)] - **meta**: bump step-security/harden-runner from 2.14.1 to 2.14.2 (dependabot\[bot]) [#​61909](https://github.com/nodejs/node/pull/61909) - \[[`498abf661e`](https://github.com/nodejs/node/commit/498abf661e)] - **meta**: bump actions/stale from 10.1.1 to 10.2.0 (dependabot\[bot]) [#​61908](https://github.com/nodejs/node/pull/61908) - \[[`78ac17f426`](https://github.com/nodejs/node/commit/78ac17f426)] - **module**: fix coverage of mocked CJS modules imported from ESM (Marco) [#​62133](https://github.com/nodejs/node/pull/62133) - \[[`46cfad4138`](https://github.com/nodejs/node/commit/46cfad4138)] - **module**: run require.resolve through module.registerHooks() (Joyee Cheung) [#​62028](https://github.com/nodejs/node/pull/62028) - \[[`8b6be3fe14`](https://github.com/nodejs/node/commit/8b6be3fe14)] - **module**: mark require(esm) as stable (Joyee Cheung) [#​60959](https://github.com/nodejs/node/pull/60959) - \[[`68fbc0c6cc`](https://github.com/nodejs/node/commit/68fbc0c6cc)] - **module**: mark module compile cache as stable (Joyee Cheung) [#​60971](https://github.com/nodejs/node/pull/60971) - \[[`c851e76f8c`](https://github.com/nodejs/node/commit/c851e76f8c)] - **(SEMVER-MINOR)** **net**: add `setTOS` and `getTOS` to `Socket` (Amol Yadav) [#​61503](https://github.com/nodejs/node/pull/61503) - \[[`4c206ecb31`](https://github.com/nodejs/node/commit/4c206ecb31)] - **quic**: remove CryptoKey support from session keys option (Filip Skokan) [#​62335](https://github.com/nodejs/node/pull/62335) - \[[`2f9c085cf5`](https://github.com/nodejs/node/commit/2f9c085cf5)] - **sqlite**: handle stmt invalidation (Guilherme Araújo) [#​61877](https://github.com/nodejs/node/pull/61877) - \[[`6ac4304c87`](https://github.com/nodejs/node/commit/6ac4304c87)] - **(SEMVER-MINOR)** **sqlite**: add limits property to DatabaseSync (Mert Can Altin) [#​61298](https://github.com/nodejs/node/pull/61298) - \[[`aaf9af1672`](https://github.com/nodejs/node/commit/aaf9af1672)] - **sqlite**: mark as release candidate (Matteo Collina) [#​61262](https://github.com/nodejs/node/pull/61262) - \[[`7d67e5d693`](https://github.com/nodejs/node/commit/7d67e5d693)] - **src**: convert context\_frame field in AsyncWrap to internal field (Anna Henningsen) [#​62103](https://github.com/nodejs/node/pull/62103) - \[[`d8ea1aaa8a`](https://github.com/nodejs/node/commit/d8ea1aaa8a)] - **src**: make AsyncWrap subclass internal field counts explicit (Anna Henningsen) [#​62103](https://github.com/nodejs/node/pull/62103) - \[[`1dbf3bedbe`](https://github.com/nodejs/node/commit/1dbf3bedbe)] - **src**: improve EC JWK import performance (Filip Skokan) [#​62396](https://github.com/nodejs/node/pull/62396) - \[[`cd84af747b`](https://github.com/nodejs/node/commit/cd84af747b)] - **src**: handle null backing store in ArrayBufferViewContents::Read (Mert Can Altin) [#​62343](https://github.com/nodejs/node/pull/62343) - \[[`4f553cdc01`](https://github.com/nodejs/node/commit/4f553cdc01)] - **src**: enable compilation/linking with OpenSSL 4.0 (Filip Skokan) [#​62410](https://github.com/nodejs/node/pull/62410) - \[[`70f8057258`](https://github.com/nodejs/node/commit/70f8057258)] - **src**: use stack allocation in indexOf latin1 path (Mert Can Altin) [#​62268](https://github.com/nodejs/node/pull/62268) - \[[`d788467b6a`](https://github.com/nodejs/node/commit/d788467b6a)] - **src**: expose async context frame debugging helper to JS (Anna Henningsen) [#​62103](https://github.com/nodejs/node/pull/62103) - \[[`4213f893ec`](https://github.com/nodejs/node/commit/4213f893ec)] - **src**: release context frame in AsyncWrap::EmitDestroy (Gerhard Stöbich) [#​61995](https://github.com/nodejs/node/pull/61995) - \[[`79fb8cbcf5`](https://github.com/nodejs/node/commit/79fb8cbcf5)] - **src**: use validate\_ascii\_with\_errors instead of validate\_ascii (Сковорода Никита Андреевич) [#​61122](https://github.com/nodejs/node/pull/61122) - \[[`2df328d59e`](https://github.com/nodejs/node/commit/2df328d59e)] - **src**: fix flags argument offset in JSUdpWrap (Weixie Cui) [#​61948](https://github.com/nodejs/node/pull/61948) - \[[`eb77a7a297`](https://github.com/nodejs/node/commit/eb77a7a297)] - **(SEMVER-MINOR)** **src**: add C++ support for diagnostics channels (RafaelGSS) [#​61869](https://github.com/nodejs/node/pull/61869) - \[[`6cda3d30c0`](https://github.com/nodejs/node/commit/6cda3d30c0)] - **src**: remove unnecessary `c_str()` conversions in diagnostic messages (Anna Henningsen) [#​61786](https://github.com/nodejs/node/pull/61786) - \[[`26c6045363`](https://github.com/nodejs/node/commit/26c6045363)] - **src**: use bool literals in TraceEnvVarOptions (Tobias Nießen) [#​61425](https://github.com/nodejs/node/pull/61425) - \[[`3c8f700fd7`](https://github.com/nodejs/node/commit/3c8f700fd7)] - **src**: track allocations made by zstd streams (Anna Henningsen) [#​61717](https://github.com/nodejs/node/pull/61717) - \[[`94dbb36d4d`](https://github.com/nodejs/node/commit/94dbb36d4d)] - **src**: do not store compression methods on Brotli classes (Anna Henningsen) [#​61717](https://github.com/nodejs/node/pull/61717) - \[[`bef661f182`](https://github.com/nodejs/node/commit/bef661f182)] - **src**: extract zlib allocation tracking into its own class (Anna Henningsen) [#​61717](https://github.com/nodejs/node/pull/61717) - \[[`e8079a8297`](https://github.com/nodejs/node/commit/e8079a8297)] - **src**: release memory for zstd contexts in `Close()` (Anna Henningsen) [#​61717](https://github.com/nodejs/node/pull/61717) - \[[`6e1197a3cc`](https://github.com/nodejs/node/commit/6e1197a3cc)] - **src**: add more checks and clarify docs for external references (Joyee Cheung) [#​61719](https://github.com/nodejs/node/pull/61719) - \[[`c28a22c4be`](https://github.com/nodejs/node/commit/c28a22c4be)] - **src**: fix cjs\_lexer external reference registration (Joyee Cheung) [#​61718](https://github.com/nodejs/node/pull/61718) - \[[`9e2c5fd7c9`](https://github.com/nodejs/node/commit/9e2c5fd7c9)] - **src**: simply uint32 to string as it must not fail (Chengzhong Wu) [#​60846](https://github.com/nodejs/node/pull/60846) - \[[`df435d32b8`](https://github.com/nodejs/node/commit/df435d32b8)] - **src**: build v8 tick processor as built-in source text modules (Joyee Cheung) [#​60518](https://github.com/nodejs/node/pull/60518) - \[[`2cb3573735`](https://github.com/nodejs/node/commit/2cb3573735)] - **src,sqlite**: fix filterFunc dangling reference (Edy Silva) [#​62281](https://github.com/nodejs/node/pull/62281) - \[[`c44f53b544`](https://github.com/nodejs/node/commit/c44f53b544)] - **stream**: preserve error over AbortError in pipeline (Marco) [#​62113](https://github.com/nodejs/node/pull/62113) - \[[`dc541370b4`](https://github.com/nodejs/node/commit/dc541370b4)] - **stream**: replace bind with arrow function for onwrite callback (Ali Hassan) [#​62087](https://github.com/nodejs/node/pull/62087) - \[[`f6cdfbfaa7`](https://github.com/nodejs/node/commit/f6cdfbfaa7)] - **stream**: optimize webstreams pipeTo (Mattias Buelens) [#​62079](https://github.com/nodejs/node/pull/62079) - \[[`fcf2a9f788`](https://github.com/nodejs/node/commit/fcf2a9f788)] - **stream**: fix brotli error handling in web compression streams (Filip Skokan) [#​62107](https://github.com/nodejs/node/pull/62107) - \[[`cdec579c6b`](https://github.com/nodejs/node/commit/cdec579c6b)] - **stream**: improve Web Compression spec compliance (Filip Skokan) [#​62107](https://github.com/nodejs/node/pull/62107) - \[[`dbe5898379`](https://github.com/nodejs/node/commit/dbe5898379)] - **stream**: fix UTF-8 character corruption in fast-utf8-stream (Matteo Collina) [#​61745](https://github.com/nodejs/node/pull/61745) - \[[`531e62cd74`](https://github.com/nodejs/node/commit/531e62cd74)] - **stream**: fix TransformStream race on cancel with pending write (Marco) [#​62040](https://github.com/nodejs/node/pull/62040) - \[[`a3751f2249`](https://github.com/nodejs/node/commit/a3751f2249)] - **stream**: accept ArrayBuffer in CompressionStream and DecompressionStream (조수민) [#​61913](https://github.com/nodejs/node/pull/61913) - \[[`65aa8f68d0`](https://github.com/nodejs/node/commit/65aa8f68d0)] - **stream**: fix pipeTo to defer writes per WHATWG spec (Matteo Collina) [#​61800](https://github.com/nodejs/node/pull/61800) - \[[`15f32b4935`](https://github.com/nodejs/node/commit/15f32b4935)] - **stream**: fix decoded fromList chunk boundary check (Thomas Watson) [#​61884](https://github.com/nodejs/node/pull/61884) - \[[`569767e52e`](https://github.com/nodejs/node/commit/569767e52e)] - **stream**: add fast paths for webstreams read and pipeTo (Matteo Collina) [#​61807](https://github.com/nodejs/node/pull/61807) - \[[`6834ca13bb`](https://github.com/nodejs/node/commit/6834ca13bb)] - **(SEMVER-MINOR)** **stream**: rename `Duplex.toWeb()` type option to `readableType` (René) [#​61632](https://github.com/nodejs/node/pull/61632) - \[[`5ed5474437`](https://github.com/nodejs/node/commit/5ed5474437)] - **test**: update WPT for WebCryptoAPI to [`2cb332d`](https://github.com/nodejs/node/commit/2cb332d710) (Node.js GitHub Bot) [#​62483](https://github.com/nodejs/node/pull/62483) - \[[`3c9c0f8577`](https://github.com/nodejs/node/commit/3c9c0f8577)] - **test**: fix test-buffer-zero-fill-cli to be effective (Сковорода Никита Андреевич) [#​60623](https://github.com/nodejs/node/pull/60623) - \[[`19a52a1abe`](https://github.com/nodejs/node/commit/19a52a1abe)] - **test**: update WPT for url to [`fc3e651`](https://github.com/nodejs/node/commit/fc3e651593) (Node.js GitHub Bot) [#​62379](https://github.com/nodejs/node/pull/62379) - \[[`111ba9bd5b`](https://github.com/nodejs/node/commit/111ba9bd5b)] - **test**: wait for reattach before initial break on restart (Yuya Inoue) [#​62471](https://github.com/nodejs/node/pull/62471) - \[[`0897c6cc08`](https://github.com/nodejs/node/commit/0897c6cc08)] - **test**: disable flaky WPT Blob test on AIX (James M Snell) [#​62470](https://github.com/nodejs/node/pull/62470) - \[[`1c3d93bfab`](https://github.com/nodejs/node/commit/1c3d93bfab)] - **test**: avoid flaky run wait in debugger restart test (Yuya Inoue) [#​62112](https://github.com/nodejs/node/pull/62112) - \[[`83416a640a`](https://github.com/nodejs/node/commit/83416a640a)] - **test**: skip test-cluster-dgram-reuse on AIX 7.3 (Stewart X Addison) [#​62238](https://github.com/nodejs/node/pull/62238) - \[[`af8d0922dd`](https://github.com/nodejs/node/commit/af8d0922dd)] - **test**: add WebCrypto Promise.prototype.then pollution regression tests (Filip Skokan) [#​62226](https://github.com/nodejs/node/pull/62226) - \[[`fc9a60ec74`](https://github.com/nodejs/node/commit/fc9a60ec74)] - **test**: update WPT for WebCryptoAPI to [`6a1c545`](https://github.com/nodejs/node/commit/6a1c545d77) (Node.js GitHub Bot) [#​62187](https://github.com/nodejs/node/pull/62187) - \[[`12ba2d74fe`](https://github.com/nodejs/node/commit/12ba2d74fe)] - **test**: update WPT for url to [`c928b19`](https://github.com/nodejs/node/commit/c928b19ab0) (Node.js GitHub Bot) [#​62148](https://github.com/nodejs/node/pull/62148) - \[[`4e15e5b647`](https://github.com/nodejs/node/commit/4e15e5b647)] - **test**: update WPT for WebCryptoAPI to [`c9e9558`](https://github.com/nodejs/node/commit/c9e955840a) (Node.js GitHub Bot) [#​62147](https://github.com/nodejs/node/pull/62147) - \[[`dc66a05558`](https://github.com/nodejs/node/commit/dc66a05558)] - **test**: improve WPT report runner (Filip Skokan) [#​62107](https://github.com/nodejs/node/pull/62107) - \[[`9536e5621b`](https://github.com/nodejs/node/commit/9536e5621b)] - **test**: update WPT compression to [`ae05f5c`](https://github.com/nodejs/node/commit/ae05f5cb53) (Filip Skokan) [#​62107](https://github.com/nodejs/node/pull/62107) - \[[`fb1c0bda0a`](https://github.com/nodejs/node/commit/fb1c0bda0a)] - **test**: update WPT for WebCryptoAPI to [`42e4732`](https://github.com/nodejs/node/commit/42e47329fd) (Node.js GitHub Bot) [#​62048](https://github.com/nodejs/node/pull/62048) - \[[`d886f27485`](https://github.com/nodejs/node/commit/d886f27485)] - **test**: fix skipping behavior for `test-runner-run-files-undefined` (Antoine du Hamel) [#​62026](https://github.com/nodejs/node/pull/62026) - \[[`f79df03e0b`](https://github.com/nodejs/node/commit/f79df03e0b)] - **test**: remove unnecessary `process.exit` calls from test files (Antoine du Hamel) [#​62020](https://github.com/nodejs/node/pull/62020) - \[[`1319295467`](https://github.com/nodejs/node/commit/1319295467)] - **test**: skip `test-url` on `--shared-ada` builds (Antoine du Hamel) [#​62019](https://github.com/nodejs/node/pull/62019) - \[[`2ea06727c6`](https://github.com/nodejs/node/commit/2ea06727c6)] - **test**: skip strace test with shared openssl (Richard Lau) [#​61987](https://github.com/nodejs/node/pull/61987) - \[[`c0680d5df7`](https://github.com/nodejs/node/commit/c0680d5df7)] - **test**: avoid flaky debugger restart waits (Yuya Inoue) [#​61773](https://github.com/nodejs/node/pull/61773) - \[[`22b748ef72`](https://github.com/nodejs/node/commit/22b748ef72)] - **test**: fix typos in test files (Daijiro Wachi) [#​61408](https://github.com/nodejs/node/pull/61408) - \[[`a20bf9a84d`](https://github.com/nodejs/node/commit/a20bf9a84d)] - **test**: allow filtering async internal frames in assertSnapshot (Joyee Cheung) [#​61769](https://github.com/nodejs/node/pull/61769) - \[[`ec2913f036`](https://github.com/nodejs/node/commit/ec2913f036)] - **test**: unify assertSnapshot stacktrace transform (Chengzhong Wu) [#​61665](https://github.com/nodejs/node/pull/61665) - \[[`460f41233d`](https://github.com/nodejs/node/commit/460f41233d)] - **test**: check stability block position in API markdown (René) [#​58590](https://github.com/nodejs/node/pull/58590) - \[[`9ad02065d5`](https://github.com/nodejs/node/commit/9ad02065d5)] - **test**: adapt buffer test for v8 sandbox (Shelley Vohr) [#​61772](https://github.com/nodejs/node/pull/61772) - \[[`5cf001736e`](https://github.com/nodejs/node/commit/5cf001736e)] - **test**: update FileAPI tests from WPT (Ms2ger) [#​61750](https://github.com/nodejs/node/pull/61750) - \[[`84c7a23223`](https://github.com/nodejs/node/commit/84c7a23223)] - **test**: update WPT for WebCryptoAPI to [`7cbe7e8`](https://github.com/nodejs/node/commit/7cbe7e8ed9) (Node.js GitHub Bot) [#​61729](https://github.com/nodejs/node/pull/61729) - \[[`276a32fd10`](https://github.com/nodejs/node/commit/276a32fd10)] - **test**: update WPT for url to [`efb889e`](https://github.com/nodejs/node/commit/efb889eb4c) (Node.js GitHub Bot) [#​61728](https://github.com/nodejs/node/pull/61728) - \[[`f5f21d36a6`](https://github.com/nodejs/node/commit/f5f21d36a6)] - **test\_runner**: add exports option for module mocks (sangwook) [#​61727](https://github.com/nodejs/node/pull/61727) - \[[`bfc8a12977`](https://github.com/nodejs/node/commit/bfc8a12977)] - **test\_runner**: make it compatible with fake timers (Matteo Collina) [#​59272](https://github.com/nodejs/node/pull/59272) - \[[`e0cde40e1d`](https://github.com/nodejs/node/commit/e0cde40e1d)] - **test\_runner**: set non-zero exit code when suite errors occur (Edy Silva) [#​62282](https://github.com/nodejs/node/pull/62282) - \[[`d74efd6834`](https://github.com/nodejs/node/commit/d74efd6834)] - **test\_runner**: run afterEach on runtime skip (Igor Shevelenkov) [#​61525](https://github.com/nodejs/node/pull/61525) - \[[`8287ca749e`](https://github.com/nodejs/node/commit/8287ca749e)] - **test\_runner**: expose expectFailure message (sangwook) [#​61563](https://github.com/nodejs/node/pull/61563) - \[[`1f2025fd1e`](https://github.com/nodejs/node/commit/1f2025fd1e)] - **(SEMVER-MINOR)** **test\_runner**: expose worker ID for concurrent test execution (Ali Hassan) [#​61394](https://github.com/nodejs/node/pull/61394) - \[[`b1199c7bb4`](https://github.com/nodejs/node/commit/b1199c7bb4)] - **test\_runner**: replace native methods with primordials (Ayoub Mabrouk) [#​61219](https://github.com/nodejs/node/pull/61219) - \[[`1ca20fc33d`](https://github.com/nodejs/node/commit/1ca20fc33d)] - **(SEMVER-MINOR)** **test\_runner**: show interrupted test on SIGINT (Matteo Collina) [#​61676](https://github.com/nodejs/node/pull/61676) - \[[`207ba4f89f`](https://github.com/nodejs/node/commit/207ba4f89f)] - **test\_runner**: fix suite rerun (Moshe Atlow) [#​61775](https://github.com/nodejs/node/pull/61775) - \[[`9927335c11`](https://github.com/nodejs/node/commit/9927335c11)] - **tls**: forward keepAlive, keepAliveInitialDelay, noDelay to socket (Sergey Zelenov) [#​62004](https://github.com/nodejs/node/pull/62004) - \[[`a1c3c901c0`](https://github.com/nodejs/node/commit/a1c3c901c0)] - **tools**: bump picomatch from 4.0.3 to 4.0.4 in /tools/eslint (dependabot\[bot]) [#​62439](https://github.com/nodejs/node/pull/62439) - \[[`1c6f5ed7c2`](https://github.com/nodejs/node/commit/1c6f5ed7c2)] - **tools**: adopt the `--check-for-duplicates` NCU flag (Antoine du Hamel) [#​62478](https://github.com/nodejs/node/pull/62478) - \[[`b53377e8fe`](https://github.com/nodejs/node/commit/b53377e8fe)] - **tools**: bump flatted from 3.4.1 to 3.4.2 in /tools/eslint (dependabot\[bot]) [#​62375](https://github.com/nodejs/node/pull/62375) - \[[`f102e79b80`](https://github.com/nodejs/node/commit/f102e79b80)] - **tools**: bump eslint deps (Huáng Jùnliàng) [#​62356](https://github.com/nodejs/node/pull/62356) - \[[`f5d74f8216`](https://github.com/nodejs/node/commit/f5d74f8216)] - **tools**: add eslint-plugin-regexp (Huáng Jùnliàng) [#​62093](https://github.com/nodejs/node/pull/62093) - \[[`bc5b9a04ad`](https://github.com/nodejs/node/commit/bc5b9a04ad)] - **tools**: bump flatted from 3.3.3 to 3.4.1 in /tools/eslint (dependabot\[bot]) [#​62255](https://github.com/nodejs/node/pull/62255) - \[[`bad48b9700`](https://github.com/nodejs/node/commit/bad48b9700)] - **tools**: validate all commits that are pushed to `main` (Antoine du Hamel) [#​62246](https://github.com/nodejs/node/pull/62246) - \[[`795d663ff4`](https://github.com/nodejs/node/commit/795d663ff4)] - **tools**: keep GN files when updating Merve (Antoine du Hamel) [#​62167](https://github.com/nodejs/node/pull/62167) - \[[`0b6fa913f1`](https://github.com/nodejs/node/commit/0b6fa913f1)] - **tools**: revert timezone update GHA workflow to ubuntu-latest (Richard Lau) [#​62140](https://github.com/nodejs/node/pull/62140) - \[[`840e098e99`](https://github.com/nodejs/node/commit/840e098e99)] - **tools**: improve error handling in test426 update script (Rich Trott) [#​62121](https://github.com/nodejs/node/pull/62121) - \[[`bd34e53a8e`](https://github.com/nodejs/node/commit/bd34e53a8e)] - **tools**: bump the eslint group across 1 directory with 2 updates (dependabot\[bot]) [#​62092](https://github.com/nodejs/node/pull/62092) - \[[`54dc797644`](https://github.com/nodejs/node/commit/54dc797644)] - **tools**: fix daily wpt workflow nighly release version lookup (Filip Skokan) [#​62076](https://github.com/nodejs/node/pull/62076) - \[[`30476ddff7`](https://github.com/nodejs/node/commit/30476ddff7)] - **tools**: fix example in release proposal linter (Richard Lau) [#​62074](https://github.com/nodejs/node/pull/62074) - \[[`5245900c05`](https://github.com/nodejs/node/commit/5245900c05)] - **tools**: bump minimatch from 3.1.3 to 3.1.5 in /tools/clang-format (dependabot\[bot]) [#​62013](https://github.com/nodejs/node/pull/62013) - \[[`59ad1e4503`](https://github.com/nodejs/node/commit/59ad1e4503)] - **tools**: bump eslint to v10, babel to v8.0.0-rc.2 (Huáng Jùnliàng) [#​61905](https://github.com/nodejs/node/pull/61905) - \[[`6f93c4b287`](https://github.com/nodejs/node/commit/6f93c4b287)] - **tools**: fix parsing of commit trailers in `lint-release-proposal` GHA (Antoine du Hamel) [#​62077](https://github.com/nodejs/node/pull/62077) - \[[`de1bcfd54c`](https://github.com/nodejs/node/commit/de1bcfd54c)] - **tools**: bump minimatch from 3.1.2 to 3.1.3 in `/tools/clang-format` (dependabot\[bot]) [#​61977](https://github.com/nodejs/node/pull/61977) - \[[`492868a7aa`](https://github.com/nodejs/node/commit/492868a7aa)] - **tools**: fix permissions for merve update script (Richard Lau) [#​62023](https://github.com/nodejs/node/pull/62023) - \[[`774d0be1b3`](https://github.com/nodejs/node/commit/774d0be1b3)] - **tools**: revert tools GHA workflow to ubuntu-latest (Richard Lau) [#​62024](https://github.com/nodejs/node/pull/62024) - \[[`d91a689d6f`](https://github.com/nodejs/node/commit/d91a689d6f)] - **tools**: bump minimatch from 3.1.2 to 3.1.3 in /tools/eslint (dependabot\[bot]) [#​61976](https://github.com/nodejs/node/pull/61976) - \[[`34b6305933`](https://github.com/nodejs/node/commit/34b6305933)] - **tools**: roll back to x86 runner on `scorecard.yml` (Antoine du Hamel) [#​61944](https://github.com/nodejs/node/pull/61944) - \[[`937cd97a63`](https://github.com/nodejs/node/commit/937cd97a63)] - **tools**: fix auto-start-ci (Antoine du Hamel) [#​61900](https://github.com/nodejs/node/pull/61900) - \[[`0958f9a9c7`](https://github.com/nodejs/node/commit/0958f9a9c7)] - **tools**: do not checkout repo in `auto-start-ci.yml` (Antoine du Hamel) [#​61874](https://github.com/nodejs/node/pull/61874) - \[[`c7607b9208`](https://github.com/nodejs/node/commit/c7607b9208)] - **tools**: automate updates for test/fixtures/test426 (Rich Trott) [#​60978](https://github.com/nodejs/node/pull/60978) - \[[`00df3c1273`](https://github.com/nodejs/node/commit/00df3c1273)] - **tools**: bump unist-util-visit in /tools/doc in the doc group (dependabot\[bot]) [#​61646](https://github.com/nodejs/node/pull/61646) - \[[`fe15b0d65e`](https://github.com/nodejs/node/commit/fe15b0d65e)] - **tools**: bump the eslint group in /tools/eslint with 6 updates (dependabot\[bot]) [#​61628](https://github.com/nodejs/node/pull/61628) - \[[`bc38db51fc`](https://github.com/nodejs/node/commit/bc38db51fc)] - **tools**: fix small inconsistencies in JSON doc output (Antoine du Hamel) [#​61757](https://github.com/nodejs/node/pull/61757) - \[[`3e7010d47f`](https://github.com/nodejs/node/commit/3e7010d47f)] - **tools**: refloat 10 Node.js patches to cpplint.py (Michaël Zasso) [#​60901](https://github.com/nodejs/node/pull/60901) - \[[`583e6c67ea`](https://github.com/nodejs/node/commit/583e6c67ea)] - **tools**: update cpplint to 2.0.2 (Michaël Zasso) [#​60901](https://github.com/nodejs/node/pull/60901) - \[[`4c12ab8abc`](https://github.com/nodejs/node/commit/4c12ab8abc)] - **typings**: rationalise TypedArray types (René) [#​62174](https://github.com/nodejs/node/pull/62174) - \[[`8357ebfe54`](https://github.com/nodejs/node/commit/8357ebfe54)] - **url**: suppress warnings from url.format/url.resolve inside node\_modules (René) [#​62005](https://github.com/nodejs/node/pull/62005) - \[[`aad7b3cfca`](https://github.com/nodejs/node/commit/aad7b3cfca)] - **url**: enable simdutf for ada (Yagiz Nizipli) [#​61477](https://github.com/nodejs/node/pull/61477) - \[[`7b28fb9812`](https://github.com/nodejs/node/commit/7b28fb9812)] - **util**: allow color aliases in styleText (sangwook) [#​62180](https://github.com/nodejs/node/pull/62180) - \[[`8bbe0138ce`](https://github.com/nodejs/node/commit/8bbe0138ce)] - **util**: add fast path to stripVTControlCharacters (Hiroki Osame) [#​61833](https://github.com/nodejs/node/pull/61833) - \[[`f7a408d6f7`](https://github.com/nodejs/node/commit/f7a408d6f7)] - **wasm**: support js string constant esm import (Guy Bedford) [#​62198](https://github.com/nodejs/node/pull/62198) - \[[`a0316d33b5`](https://github.com/nodejs/node/commit/a0316d33b5)] - **watch**: get flags from execArgv (Efe) [#​61779](https://github.com/nodejs/node/pull/61779) - \[[`eee96f7f5d`](https://github.com/nodejs/node/commit/eee96f7f5d)] - **worker**: heap profile optimizations (Ilyas Shabi) [#​62201](https://github.com/nodejs/node/pull/62201) - \[[`deeeb22e1a`](https://github.com/nodejs/node/commit/deeeb22e1a)] - **worker**: eliminate race condition in process.cwd() (giulioAZ) [#​61664](https://github.com/nodejs/node/pull/61664) - \[[`b15ea64ed9`](https://github.com/nodejs/node/commit/b15ea64ed9)] - **zlib**: fix use-after-free when reset() is called during write (Matteo Collina) [#​62325](https://github.com/nodejs/node/pull/62325) - \[[`a9c5bd29c9`](https://github.com/nodejs/node/commit/a9c5bd29c9)] - **zlib**: add support for brotli compression dictionary (Andy Weiss) [#​61763](https://github.com/nodejs/node/pull/61763) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Amsterdam) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTEuMCIsInVwZGF0ZWRJblZlciI6IjQzLjExMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.bjw-s.dev/bjw-s/action-changed-files/pulls/15
|
I did not look deeply into this, while it did have an impact on our tests where one test now needs to call destroy async, otherwise it would not work anymore: https://github.com/DataDog/dd-trace-js/pull/8020/changes (the path changes are another change). This does not come with a regression test, so we also do not test for the changed behavior, if I am not mistaken. Could that still be added? |
This is a change of approach for fixing the same bug as #61658, which already added a regression test for the issue.
From that PR, it looks like your code repeatedly creates and then destroys an HTTP request in a single tick, and the issue is you somehow end up unexpectedly with multiple errors listeners on the socket when the existing socket then gets reused later on. Honestly that's quite surprising, since explicitly destroying the request should destroy the socket as well (at least, according to our docs) and so it shouldn't be reused in the first place. I don't have any time to look properly now till next week but I try to take a look then, or @RajeshKumar11 might be interested to take a look in the meantime? A minimal repro would be helpful @BridgeAR if you can extract one from your tests. |
|
Hi @pimterry, this is reproducible using this simple example. This will throw the following warning: (node:7412) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit |
|
@BridgeAR @pabloerhard Thanks for the repro, this is fixed in #62872 |
This stops `MaxListenersExceededWarning` from crashing the test process on Node v24.15.0, which leaks an internal `socketErrorListener` on every keep-alive agent socket reuse. Tests that issue several requests through the same socket — `instrumentation-http` and the RASP fastify blocking suite are the current victims — pile up enough listeners to trip our strict `defaultMaxListeners=6` and crash via the warning rethrow. Detect the leak by its stable signature: two or more listeners named `socketErrorListener` on the same emitter for event `error`. The upstream fix is merged on Node `main` but not yet released in v24.x; once it ships the duplicates disappear and the detector returns false again, so real listener leaks resume throwing. Refs: nodejs/node#61770 Refs: nodejs/node#62872
This stops `MaxListenersExceededWarning` from crashing the test process on Node v24.15.0, which leaks an internal `socketErrorListener` on every keep-alive agent socket reuse. Tests that issue several requests through the same socket — `instrumentation-http` and the RASP fastify blocking suite are the current victims — pile up enough listeners to trip our strict `defaultMaxListeners=6` and crash via the warning rethrow. Detect the leak by its stable signature: two or more listeners named `socketErrorListener` on the same emitter for event `error`. The upstream fix is merged on Node `main` but not yet released in v24.x; once it ships the duplicates disappear and the detector returns false again, so real listener leaks resume throwing. Refs: nodejs/node#61770 Refs: nodejs/node#62872
This stops `MaxListenersExceededWarning` from crashing the test process on Node v24.15.0, which leaks an internal `socketErrorListener` on every keep-alive agent socket reuse. Tests that issue several requests through the same socket — `instrumentation-http` and the RASP fastify blocking suite are the current victims — pile up enough listeners to trip our strict `defaultMaxListeners=6` and crash via the warning rethrow. Detect the leak by its stable signature: two or more listeners named `socketErrorListener` on the same emitter for event `error`. The upstream fix is merged on Node `main` but not yet released in v24.x; once it ships the duplicates disappear and the detector returns false again, so real listener leaks resume throwing. Refs: nodejs/node#61770 Refs: nodejs/node#62872
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: nodejs#48771 Refs: nodejs#61658 PR-URL: nodejs#61770 Refs: nodejs#48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Between onSocket and onSocketNT, the socket had no error handler, meaning any errors emitted during that window (e.g. from a blocklist check or custom lookup) would be unhandled even if the user had set up a request error handler. Fix this by attaching socketErrorListener synchronously in onSocket, setting socket._httpMessage so the listener can forward errors to the request. The _destroy path in onSocketNT is also guarded to prevent double-firing if socketErrorListener already emitted the error. Fixes: #48771 Refs: #61658 PR-URL: #61770 Refs: #48771 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
…44191) ### Problem - An `https` request through a proxy emits only `'close'` when the connection ends between the `200` of the CONNECT and the end of the TLS handshake. Node emits `'error'` first: `ECONNRESET`, `Client network socket disconnected before secure TLS connection was established`. - `Agent#createSocket` gives the request the failed socket with the error (`src/js/node/_http_agent.ts:354`, `:530`). The TLS layer set `_hadError` on it, so the guard at `src/js/node/_http_client.ts:1076` skips the `'error'`. ### Fix - `Agent#createSocket` passes only the error, as Node does. `https.Agent#createConnection` closes the proxy connection after every `ERR_PROXY_TUNNEL`, which the request did before. `_http_client.ts` does not change. - Correct: a request gets no socket that it did not listen to. 13 of 13 failure routes equal Node v26.3.0 in events, code and tick (base: 0). - Verified: `test/js/node/http/node-http-proxy-url.test.ts`: 23 tests fail without the fix, 22 also under Node. Also 100 vendored Node tests. - Self-reviewed: 8 concerns raised, 8 addressed. ### Background - The forwarding is from #31587 ([thread](#31587 (comment))), to close a connection that a proxy holds after a refused CONNECT. That thread set aside the close in `createConnection`, which this PR takes. - Considered a guard in the request: one tick after Node, and a custom `createConnection` callback `(err, x)` stays broken. ### Downsides - Not as Node, on purpose: after a refused CONNECT, a direct `https.Agent#createConnection` caller gets a destroyed socket. Node leaves it open. - As in Node: `agent.createSocket()` calls back with `(err)` only. A request with no `'error'` listener throws this `ECONNRESET`. - Not covered: `https-proxy-agent`, `tunnel` and a direct `https` request still report `ERR_SOCKET_CLOSED` (#43381, item 4). <details><summary>Notes</summary> #### Reproduction ```js // bun repro.mjs / node repro.mjs import net from "node:net"; import https from "node:https"; const proxy = net.createServer(s => { s.on("error", () => {}); s.once("data", () => { s.write("HTTP/1.1 200 Connection established\r\n\r\n"); s.once("data", () => s.end()); // the ClientHello }); }); await new Promise(r => proxy.listen(0, "127.0.0.1", r)); const agent = new https.Agent({ proxyEnv: { https_proxy: `http://127.0.0.1:${proxy.address().port}` } }); const req = https.get({ host: "example.invalid", port: 443, path: "/", agent }); req.on("error", e => console.log("error:", e.code, e.message)); req.on("close", () => { console.log("close"); proxy.close(); }); ``` ``` node v26.3.0, and bun with this PR: error: ECONNRESET Client network socket disconnected before secure TLS connection was established close bun 1.4.0, 1.4.1, 1.4.2, main 1313ca6 (3 of 3 runs each, linux-x64): close ``` The proxy ends its side with `end()` after it read the ClientHello. A `destroy()` with unread bytes is a reset, which takes another path through the client and was reported before. The proxy does not have to be at fault: a proxy that relays the close of a target that hangs up during the handshake gives the same result. The report also says that the process never exits. No handle is left open: both sockets are closed and `process.getActiveResourcesInfo()` is empty. The awaited promise never settles, and Bun does not exit on an unsettled top-level await (#33283). #### Who hits it - The built-in proxy support of `node:https`: `new https.Agent({ proxyEnv })`, the global agent under `NODE_USE_ENV_PROXY=1`, and `http.setGlobalProxyFromEnv()`. - An `http://` proxy connection that ends with the `200` or after it, and an `https://` proxy connection that ends during its own TLS handshake or after its `200`. - A request that waited behind `maxSockets`. - No proxy: a custom `Agent#createConnection` that calls back with `(err, socket)`. With a second argument that has no `destroy()` the process ended with `TypeError: socket.destroy is not a function`. The request destroyed a live socket that it was given this way. Node leaves the second argument alone. Not this bug: `https-proxy-agent`, `tunnel` and a direct `https` request, where the request writes to the TLS socket before the handshake is done. They report `ERR_SOCKET_CLOSED` where Node reports `ECONNRESET`, before and after this PR. That is item 4 of #43381, and #43392 is the open PR for it. #### The earlier decision in #31587 The review thread of #31587 found that a proxy which refuses the CONNECT and holds the connection left that connection open, as in Node. It named two ways: forward the socket from the Agent to the request (taken, d677423), or close the connection in `cleanupAndPropagate` for every error (set aside as further from upstream). The forwarding applies to every failed socket creation, not only to a refused CONNECT. So the request also gets the sockets that the TLS layer already marked, and loses its `'error'`. With this PR the Agent is Node's text again, and the one line that differs from Node is the condition in `cleanupAndPropagate`. The test that #31587 added for the held connection passes with no change to its assertions. Node has the same guard since nodejs/node#61770. With an agent whose `createSocket` calls back with `(err, socket)` and a socket that the peer ended during the TLS handshake, Node v26.3.0 also emits only `'close'`. So the forwarding cannot go upstream as it is. Node v26.3.0 leaves the held connection open. #### Measurements Release builds of 1313ca6 and of the three source expressions of this PR on it, linux-x64, and Node v26.3.0. `_http_agent.ts`, `https.ts` and `_http_client.ts` are the same at 1313ca6 and at the base of this branch. Every count is the same in 5 of 5 runs. - builtin JS text: `_http_agent.js` -13 B, `https.js` -33 B, `_http_client.js` 0 B (`wc -c`, `cmp`: identical). bun binary text+data -46 B (`size`: text 80662588 to 80662542, data 110424). - success path: 0 changed bytecode instructions. `onSocketReady` 47, `onSocketCreatedForPending` 45, `cleanupAndPropagateImpl` 36 instructions (base 48/47/38, JSC bytecode dump). - successful request, `nextTick` entries / listener registrations on the socket / `bind` calls, from the moment the Agent has the socket to the `'socket'` event: http 2/9/1, keep-alive 1/5/1, https 2/10/1, tunnel 2/9/0. Base and PR are identical. `createSocket` reported an error 0 of 800 times. - failed creation, `nextTick` entries / listener registrations on the failed socket, from the failure callback to the `'close'` of the request: FIN 1/0 (base 2/1, node 1/0), held 407 1/0 (base 3/1, node 1/1). - 13 of 13 failure routes equal Node v26.3.0 in events, error code and `nextTick` turn (base 0 of 13). FIN routes: `'error'` and `'close'` at turn 1/1 (node 1/1, base no `'error'`, `'close'` at turn 2). The message equals Node's on 11 of 13. The other 2 are texts of the TLS library, the same before and after. - held non-200 CONNECT: the proxy connection is closed for 7 of 7 callers (node 0, base 2) and for 5 of 5 status lines without a code. A direct `createConnection` caller sees `socket.destroyed === true` in its callback (node `false`, base `false`). - custom `createConnection` `cb(err, x)`: 16 of 16 rows equal Node (base 0 of 16), `destroy()` is called on `x` 0 times (node 0, base 8), 0 rows end in an uncaught exception (base 10). The callback of `agent.createSocket()` gets 1 argument after a failure (node 1, base 2). The 13 routes: FIN after the ClientHello, `200` with the FIN, `https://` proxy FIN during its handshake, `https://` proxy `200` then FIN, held 407, 500, RST after the `200`, bytes that are not TLS after the `200`, certificate error, end before the `200`, tunnel timeout, request queued behind `maxSockets`, global agent with `NODE_USE_ENV_PROXY=1`. The 7 callers: a request through the agent, a request queued behind `maxSockets`, `agent.createSocket()`, a subclass that passes on only the error, the `createConnection` option of a request, `agent.createConnection()` with a callback and without one. #### Behavior that changes besides the fix - `'close'` of a request comes one `nextTick` turn earlier after every failed socket creation, on the turn where Node emits it. - The request does not call `destroy()` on what a custom `createConnection` passes with an error. - A subclass that overrides `createSocket` and calls back with `(err, socket)` for a request that waited behind `maxSockets`: the request emits `'error'`, then `'close'`, and does not call `destroy()` on that socket. Before, it emitted only `'close'` when the socket had `_hadError`, and destroyed the socket. The subclass owns that socket now, as in Node. - After a CONNECT reply with a status line that has no usable code (for example `HTTP/1.1 abc`), a direct caller of `createConnection` gets a destroyed socket, as in Node. #### Left as it is - `req.onSocket(socket, err)` called directly with a socket that has `_hadError`, and a subclass that overrides `createSocket` and calls back with `(err, socket)` for a request that did not wait: only `'close'`, also in Node. - The `createConnection` option of a request that reports an error through its callback: `'error'` and no `'close'`, also in Node. - A tunnel that is still pending: while the proxy does not answer the CONNECT, `req.destroy(err)`, `req.abort()`, an aborted signal and `agent.destroy()` emit no `'error'` and no `'close'`, and the proxy connection stays open. When the proxy closes, the request reports `ERR_PROXY_TUNNEL`. Node v26.3.0 does the same. - Two changes of Node's tunnel code after v26.3.0 are not ported here: the limit on the headers of the CONNECT reply (nodejs/node 84e367579e) and the handling of TLS options that `tls.connect()` rejects (nodejs/node#66096). Both are separate work. - Error messages of the TLS library differ from Node's (`WRONG_VERSION_NUMBER`, `self signed certificate`). - `agent.sockets[name]` is deleted after a failed creation. Node keeps an empty array. #### Tests - `test/js/node/http/node-http-proxy-url.node.mts` runs under Node and under Bun. 22 new tests: 4 ways a proxy connection ends, a destroyed and an aborted request, `new http.ClientRequest`, `http.setGlobalProxyFromEnv()`, `diagnostics_channel`, a queued request, 5 tests of a refused CONNECT, 7 of a creation callback with an error and a second argument. 6 of them also assert the `nextTick` turn of `'error'` and `'close'`. - `test/js/node/http/node-http-proxy-url.test.ts`: the global agent with `NODE_USE_ENV_PROXY=1`, in a child process. - linux-x64, debug build. With the fix: 32 of 32 in the dual file (Node v26.3.0: 32 of 32) and 4 of 4 in the wrapper. Without the fix: the 22 and the 1 fail. - Each source edit alone, reverted on a debug build: `_http_agent.ts:350` 17 tests fail, `:524` 1 test fails, `https.ts` 5 tests fail. With `req.onSocket` one `nextTick` late, the 6 turn assertions fail. - CI build 121492 at 6c55f8a ran `node-http-proxy-url.test.ts` and `node-http.test.ts` on every lane, and both pass at the first attempt: Linux glibc and musl, macOS and Windows, each on x64 and arm64, and the ASAN lane. The Node run reports 32 of 32 on each lane. - Windows x64, without the fix: the canary a7c73fd prints only `close` for the reproduction. - Unchanged and passing on linux-x64: `node-http.test.ts` (263 pass), `node-https-agent-checkserveridentity-reuse.test.ts` (30), `node-http-agent-free-socket.test.ts` (9), `node-http-client-request-gc.test.ts`, `trace-events.test.ts`, the two Agent tests of `module-graph-io.test.ts`. - Vendored Node tests: 100 of 101 pass (`test-https-proxy-request-*`, `test-http-proxy-request-*`, `test-http-agent*`, `test-https-agent*`, `test-http-client-abort*`, `test-http-set-global-proxy-from-env-*`, `test-tls-over-http-tunnel`, and more). `test-http-agent-keepalive.js` fails on a debug build with and without this change. </details> <!-- robobun:evidence:begin --> --- **no test proof** · iteration 1 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/js/node/http/node-http.test.ts <!-- robobun:evidence:end -->
Summary
Fixes the underlying issue identified in #61658 (already merged) where socket errors could be unhandled even when a user had set up a request error handler.
Root Cause
Between
onSocketandonSocketNT, the socket had no error handler. If an error was emitted during this window (e.g. from a blocklist check or custom lookup function), it would be unhandled even if the user hadreq.on('error', ...)set up.This happened because:
createConnectionreturns the socket synchronouslyprocess.nextTick(ininternal/streams/destroy)onSocketNTis also deferred viaprocess.nextTick(to set upsocketErrorListener)nextTickfires beforeonSocketNT'snextTick, so no handler is registeredFix
Attach
socketErrorListenersynchronously inonSocket, before theprocess.nextTick(onSocketNT, ...)call. This requires:socket._httpMessage = thisearly (needed bysocketErrorListenerto find the request)tickOnSocketto avoid duplicates_destroyinonSocketNTagainst double-firing ifsocketErrorListeneralready emitted the error(req.socket || socket)._hadErrorsincereq.socketmay not be assigned yet at early error timeTesting
test/parallel/test-http-request-lookup-error-catchable.js(from net: defer synchronous destroy calls in internalConnect #61658)test/parallel/test-http-*.jstests passRefs: #48771
Refs: #61658